package com.cskaoyan.mapper;

import com.cskaoyan.bean.system.Role;
import com.cskaoyan.bean.system.RoleExample;
import com.cskaoyan.bo.system.RoleCreateBo;
import com.cskaoyan.vo.system.RoleCreateVo;
import com.cskaoyan.vo.system.RoleOptionsVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {


    long countByExample(RoleExample example);

    int deleteByExample(RoleExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Role record);

    int insertSelective(Role record);

    List<Role> selectByExample(RoleExample example);

    Role selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByExample(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    // 自己写的
    List<RoleOptionsVo> selectAllRoleOptions();

    List<String> selectRoleByIds(@Param("roleIds") Integer[] roleIds);

    int insertRole(@Param("role") RoleCreateBo roleCreateBo);

    RoleCreateVo selectRoleById(@Param("id") Integer id);

    int updateRole(@Param("role") RoleCreateVo roleUpdateBo);

    int deleteByIdLogically(@Param("id") Integer id);
}